package com.zhonghui.mes.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhonghui.common.annotation.Excel;
import com.zhonghui.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

@Setter
@Getter
public class MesMaterialApplyVo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 编号 */
    @Excel(name = "编号")
    @ApiModelProperty("编号")
    private Long id;

    /** 领料单号 */
    @Excel(name = "领料单号")
    @ApiModelProperty("领料单号")
    private String oddNumber;

    /** 生产计划 */
    @Excel(name = "生产计划")
    @ApiModelProperty("生产计划")
    private String planNumber;

    /** 计划排产id */
    @Excel(name = "计划排产id")
    @ApiModelProperty("计划排产id")
    private Long plannedProductionId;

    private String serialNo;


    @Excel(name = "产品id")
    @ApiModelProperty("产品id")
    private String materialId;

    /** 产品 */
    @Excel(name = "产品")
    @ApiModelProperty("产品")
    private String materialName;

    /** 规格 */
    @Excel(name = "规格")
    @ApiModelProperty("规格")
    private String materialModel;

    /** 型号 */
    @Excel(name = "型号")
    @ApiModelProperty("型号")
    private String materialSpecifications;

    /** 单位 */
    @Excel(name = "单位")
    @ApiModelProperty("单位")
    private String materialUnit;

    /** 领取日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "领取日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("领取日期")
    private Date collectionDate;

    /** 待产数量 */
    @Excel(name = "待产数量")
    @ApiModelProperty("待产数量")
    private Double producedQuantity;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("生产日期")
    private Date manufactureDate;

    /** 申请人id */
    @Excel(name = "申请人id")
    @ApiModelProperty("申请人id")
    private Long applicant;

    /** 申请人 */
    @Excel(name = "申请人")
    @ApiModelProperty("申请人")
    private String applicantName;

    /** 申请时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("申请时间")
    private Date applicantDate;

    /** 申请状态 */
    @Excel(name = "申请状态")
    @ApiModelProperty("申请状态")
    private Integer applicantStatus;

    /** 审核人id */
    @Excel(name = "审核人id")
    @ApiModelProperty("审核人id")
    private Long reviewer;

    /** 审核人 */
    @Excel(name = "审核人")
    @ApiModelProperty("审核人")
    private String reviewerName;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("审核时间")
    private Date reviewerDate;

    /** 审核状态 */
    @Excel(name = "审核状态")
    @ApiModelProperty("审核状态")
    private Integer reviewerStatus;

    /** 审核意见 */
    @ApiModelProperty("审核意见")
    private String reviewComments;

    /** 状态 */
    @Excel(name = "状态")
    @ApiModelProperty("状态")
    private Integer status;

    /** 领料申请-生产计划明细 */
    @ApiModelProperty("领料申请-生产计划明细")
    private List<MesMaterialApplyItemVo> mesMaterialApplyItemList;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("oddNumber", getOddNumber())
                .append("planNumber", getPlanNumber())
                .append("plannedProductionId", getPlannedProductionId())
                .append("serialNo", getSerialNo())
                .append("materialName", getMaterialName())
                .append("materialModel", getMaterialModel())
                .append("materialSpecifications", getMaterialSpecifications())
                .append("materialUnit", getMaterialUnit())
                .append("collectionDate", getCollectionDate())
                .append("producedQuantity", getProducedQuantity())
                .append("manufactureDate", getManufactureDate())
                .append("applicant", getApplicant())
                .append("applicantName", getApplicantName())
                .append("applicantDate", getApplicantDate())
                .append("applicantStatus", getApplicantStatus())
                .append("reviewer", getReviewer())
                .append("reviewerName", getReviewerName())
                .append("reviewerDate", getReviewerDate())
                .append("reviewerStatus", getReviewerStatus())
                .append("reviewComments", getReviewComments())
                .append("status", getStatus())
                .append("mesMaterialApplyItemList", getMesMaterialApplyItemList())
                .toString();
    }
}
